a = {
    'trade': {
        'trade_add_request': {
            'trade': {
                'trade_type': 'presale',
                'adjust_fee': 0,
                'buyer_nick': '李超',
                'created': '2019-02-15 17:07:04',
                'discount_fee': 0,
                'payment': 0,
                'receiver_name': '李超',
                'receiver_state': '河北省',
                'receiver_city': '保定市',
                'receiver_district': '望都县',
                'receiver_address': '123',
                'receiver_mobile': '18612386233',
                'post_fee': 0,
                'tid': '201902151707046403261582',
                'total_fee': 0,
                'isverifyinventory': 1,
                'orders': {
                    'order': [
                        {
                            'tid': '201902151707046403261582',
                            'num': 1,
                            'oid': '201902151707046713085289',
                            'total_fee': 0.0,
                            'price': 0.0,
                            'outer_iid': "958982",
                            'title': '测试商品4-0710'
                        },
                        {
                            'tid': '201902151707046403261582',
                            'num': 2,
                            'oid': '201902151707047192626787',
                            'total_fee': 0.0,
                            'price': 0.0,
                            'outer_iid': "958981",
                            'title': '测试商品6-0710'
                        }
                    ]
                }
            }
        }
    }
}

d = {
    'trade': {
        'trade_add_request': {
            'trade': {
                'total_fee': 100.0,
                'payment': 100.0,
                'post_fee': 0,
                'trade_type': 'presale',
                'adjust_fee': 0,
                'buyer_nick': '黄1',
                'created': '2019-03-26 18:52:50',
                'discount_fee': 0,
                'receiver_name': '黄1',
                'receiver_state': '北京市',
                'receiver_city': '市辖区',
                'receiver_district': '西城区',
                'receiver_address': '1323123',
                'receiver_mobile': '13123131231',
                'tid': '201903261852501116373882',
                'isverifyinventory': 1,
                'orders': {
                    'order': [
                        {
                            'tid': '201903261852501116373882',
                            'num': 3,
                            'oid': '201903261852502145786549',
                            'total_fee': 60.0,
                            'price': 20.0,
                            'outer_iid': "958901",
                            'title': '北京切换OMS测试商品003'
                        },
                        {
                            'tid': '201903261852501116373882',
                            'num': 2,
                            'oid': '201903261852501676066792',
                            'total_fee': 40.0,
                            'price': 20.0,
                            'outer_iid': "958981",
                            'title': '测试商品6-0710'
                        }
                    ]
                }
            }
        }
    }
}

b = {
    "type": "1",
    "orderstate": "0",
    "submitstate": "0",
    "porder": {
        "supplierOrderId": "201902181447333868179557",
        "orderNakedPrice": "0",
        "orderTaxPrice": "3",
        "orderPrice": "3",
        "sku": [
            {
                "skuId": "958901",
                "num": "1",
                "nakedprice": "0",
                "taxprice": "0",
                "bizPrice": "0"
            },
            {
                "skuId": "958981",
                "num": "2",
                "nakedprice": "0",
                "taxprice": "0",
                "bizPrice": "0"
            }
        ]
    },
    "cOrder": [
        {
            "supplierOrderId": "201902181447333868179557-1",
            "type": "2",
            "orderNakedPrice": "0",
            "orderTaxPrice": "1",
            "orderPrice": "1",
            "sku": [
                {
                    "skuId": "958901",
                    "num": "1",
                    "nakedprice": "0",
                    "taxprice": "0",
                    "taxRate": "0"
                }
            ],
            "state": "0",
            "porder": "201902181447333868179557",
            "orderState": "1",
            "submitState": "1",
            "postprice": "0",
            "posttaxprice": "6%"
        }, {
            "supplierOrderId": "201902181447333868179557-2",
            "type": "2",
            "orderNakedPrice": "0",
            "orderTaxPrice": "2",
            "orderPrice": "2",
            "sku": [
                {
                    "skuId": "958981",
                    "num": "2",
                    "nakedprice": "0",
                    "taxprice": "0",
                    "taxRate": "0"
                }
            ],
            "state": "0",
            "porder": "201902181447333868179557",
            "orderState": "1", "submitState": "1",
            "postprice": "0", "posttaxprice": "6%"
        }
    ],
    "orderstatus": "200",
    "state": "0"
}

c = {
    "supplierOrderId": "201902181604142188083334",
    "type": "2",
    "orderPrice": "3",
    "orderNakedPrice": "0",
    "orderTaxPrice": "3",
    "sku": [{
        "skuId": "958982",
        "num": "1",
        "nakedprice": "0",
        "taxprice": "0",
        "taxRate": "0",
        "bizPrice": "0"
    },
        {
            "skuId": "958981",
            "num": "2",
            "nakedprice": "0",
            "taxprice": "0",
            "taxRate": "0",
            "bizPrice": "0"}],
    "state": "0",
    "pOrder": "201902181604142188083334",
    "orderState": "1",
    "submitState": "1",
    "postprice": "0",
    "posttaxprice": "6%"
}


"""
[{"goodsid": 3, "num": 3}, {"goodsid": 2, "num": 2}]
1、拆分订单   [{"公司":[{"goods":goods_obj, "num":3},{"goods":goods_obj, "num":2}], "运费":""}]
2、计算运费， 更新数据 [{"公司":[{"goods":goods_obj, "num":3},{"goods":goods_obj, "num":2}], "运费":""}]
    for循环 根据公司补贴运费，
        如果公司=="我买网公司"
            计算重量，计算运费，然后补贴运费, 将运费更新到之前的数据里
3、 插入数据， 创建基础订单，创建主订单（总运费），创建子订单（商品总价格）， 更新基础订单商品价格，订单总金额，
"""
